# -*- coding: utf-8 -*-
# blog.urls
"""
The-O-Kay-Blog routing configuration

:Copyright: (c) 2009 Victor Goh <victorgoh@gmail.com>,
                     All rights reserved.
:license: BSD, see LICENSE for more details.
"""
from kay.routing import (
  ViewGroup, Rule
)
import blog.post_deploy as post_deploy

post_deploy.run_deploy_task()

view_groups = [
    ViewGroup(
        Rule('/', endpoint='get_content', view='blog.views.static.get_content'),
        Rule('/admin/', endpoint='admin', view='blog.views.admin.index'),
        Rule('/admin/<int:start>/<int:count>', endpoint='admin'),
        Rule('/admin/post/<int:post_id>', endpoint='post', view='blog.views.admin.post'),
        Rule('/admin/newpost', endpoint='post'),
        Rule('/admin/regenerate', endpoint='regenerate', view='blog.views.admin.regenerate_site'),
        Rule('/admin/preview', endpoint='preview', view='blog.views.admin.preview'),
        Rule('/<path:path>', endpoint='get_content'),

    )
]
